#pragma once


#include "RayTracer/RayTracer.hpp"
#include "RayTracer/Model.hpp"


namespace RayTracer
{
	class BEGIN_ALIGNED( Plane, 16 ) : public Model
	{
	public:
		ALIGNED_MEMORY( Plane, 16 );


		virtual bool				Parse( Scene& s, JSONValue* v ) override;
		virtual bool				Intersect( Vector3::ParamType_t origin, Vector3::ParamType_t dir, float& t ) const override;
		virtual Vector3				Normal( const Vector3& hp ) const override;

	private:
		Vector3						mNormal;
		float						mDistance;
	} END_ALIGNED( Plane, 16 );
}
